.PHONY: clean all
CFLAGS = -Wall -O1 -g
CFLAGS += -I../min_list
CLIBS = -lm

targets = mhvi_search_main
sources = mhvi_search_main.c mhvi_search.c ../min_list/min_list.c
objects = $(sources:.c=.o)

all: $(targets)
	@echo "Done!"

$(targets): $(objects)
	gcc $(CFLAGS) $^ $(CLIBS) -o $@
	rm -f $(objects)

%.o: %.c
	gcc $(CFLAGS) -c $^ -o $@

clean:
	rm -f *.o main